package clothinglibraryenumsmysql

const (
	DanceComposePropChangeLogChangeTypeAdd     = 1 //增加
	DanceComposePropChangeLogChangeTypeReduced = 2 //减少

	DanceComposePropChangeLogSourceDirectDrawPrize = 1
	DanceComposePropChangeLogSourceChangeDrawPrize = 2 //抽奖兑换获得
	DanceComposePropChangeLogSourceStoreChange     = 3 //商城兑换奖品减少
	DanceComposePropChangeLogSourceOtherGiveChange = 4 //他人赠送获得
	DanceComposePropChangeLogSourceGiveOtherChange = 5 //赠送他人减少
	DanceComposePropChangeLogSourceAddSplinter     = 6 //补发添加
	DanceComposePropChangeLogSourceCutSplinter     = 7 //补发减少
)

type DanceComposePropChangeLogEnums struct {
}

var DanceComposePropChangeLogEnumsObject DanceComposePropChangeLogEnums

func (e DanceComposePropChangeLogEnums) SourceType() []int {
	return []int{
		DanceComposePropChangeLogSourceDirectDrawPrize,
		DanceComposePropChangeLogSourceChangeDrawPrize,
		DanceComposePropChangeLogSourceStoreChange,
	}
}

func (e DanceComposePropChangeLogEnums) SourceMap() map[int]string {
	m := make(map[int]string)
	for _, s := range e.SourceType() {
		m[s] = e.SourceString(s)
	}
	return m
}

func (e DanceComposePropChangeLogEnums) SourceString(tag int) string {
	switch tag {
	case DanceComposePropChangeLogSourceDirectDrawPrize:
		return "抽奖直接获得"
	case DanceComposePropChangeLogSourceChangeDrawPrize:
		return "抽奖兑换获得"
	case DanceComposePropChangeLogSourceStoreChange:
		return "商城兑换奖品减少"
	case DanceComposePropChangeLogSourceOtherGiveChange:
		return "他人赠送获得"
	case DanceComposePropChangeLogSourceGiveOtherChange:
		return "赠送他人减少"
	default:
		return "其他"
	}
}

func (e DanceComposePropChangeLogEnums) ChangeType() []int {
	return []int{
		DanceComposePropChangeLogChangeTypeAdd,
		DanceComposePropChangeLogChangeTypeReduced,
	}
}

func (e DanceComposePropChangeLogEnums) ChangeTypeMap() map[int]string {
	m := make(map[int]string)
	for _, s := range e.ChangeType() {
		m[s] = e.ChangeTypeString(s)
	}
	return m
}

func (e DanceComposePropChangeLogEnums) ChangeTypeString(tag int) string {
	switch tag {
	case DanceComposePropChangeLogChangeTypeAdd:
		return "增加"
	case DanceComposePropChangeLogChangeTypeReduced:
		return "减少"
	default:
		return "其他"
	}
}
